package com.mall.product.service;

import com.mall.common.page.PageData;
import com.mall.common.service.CrudService;
import com.mall.product.dto.AttrDTO;
import com.mall.product.dto.AttrGroupDTO;
import com.mall.product.entity.AttrGroupEntity;
import com.mall.product.vo.AttrGroupRelationVo;
import com.mall.product.vo.AttrGroupWithAttrVo;
import com.mall.product.vo.SkuItemVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author xjc xjc@163.com
 * @since 1.0.0 2022-07-17
 */
public interface AttrGroupService extends CrudService<AttrGroupEntity, AttrGroupDTO> {

    PageData<AttrGroupDTO> queryPageByCatelogId(Map<String, Object> params, Long catelogId);

    List<AttrDTO> findAllRelationGrooup(Long attrGroupId);

    AttrGroupEntity findByAttrId(Long attrId);

    PageData<AttrDTO> findAllUnRelationGrooup(Map<String, Object> params,Long attrGroupId);

    void savaRelation(List<AttrGroupRelationVo> relationVos);

    List<AttrGroupWithAttrVo> getAttrGroupWithAttrsByCatelogId(Long catelogId);

    List<SkuItemVo.SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId,Long catelogId);
}